package com.crowdsourcing.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author renbaojia 1406423298@qq.ocom
 * @version 1.0
 * @CREATED 2019/3/5 13:24:27
 * @des
 * @修改记录:
 **/
@Controller
public class IndexController {

    @GetMapping("/")
    public String index() {
        return "index";
    }

    @GetMapping("/login")
    public String login() {
        return "login";
    }

    @GetMapping("/publisher")
    public String publisher() {
        return "publisher";
    }

    @GetMapping("/push")
    public String push(HttpServletRequest request) {
        request.setAttribute("status", "push");
        return "push";
    }

    @GetMapping("/receive")
    public String receive() {
        return "receive";
    }

    @GetMapping("/pull")
    public String pull(HttpServletRequest request) {
        request.setAttribute("status", "pull");
        return "pull";
    }
}
